<template>
<div>
  <el-dialog
      title="预警详情"
      :visible.sync="dialogVisible"
      width="1150px"
      height="800px"
      :modal="false"
      custom-class="deep"
      class="animate__animated animate__zoomIn"
    >
  <div class="warnDialogStyle">
    <el-row style="text-align:center;color:white">
      <el-col :span="5">
        <div style="width: 20px;height: 4px;"></div>
      </el-col>
      <el-col :span="5">
        <div class="btn-item cursor-pointer" @click="handlePlatformClick">
          <img src="../../assets/image/nmodule/sptjb.png" style="width: 45px" />
          <div class="fontSize18">四平台交办</div>
        </div>
      </el-col>
      <el-col :span="5">
        <div class="btn-item cursor-pointer" @click="handleDdAssignClick">
          <img src="../../assets/image/nmodule/zzdjb.png" style="width: 45px" />
          <div class="fontSize18">浙政钉交办</div>
        </div>
      </el-col>
      <el-col :span="5">
        <div class="btn-item cursor-pointer" v-if="detail.eventStatus !== 3" @click="handleWriteClick">
          <div class="yujinghexiao"><i class="el-icon-s-claim"></i></div>
          <div class="fontSize18">预警核销</div>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="3">
        <span class="dialogT">预警编号:</span>
      </el-col>
      <el-col :span="21">
        <span class="dialogT con">{{ detail.orderId }}</span>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="3">
        <span class="dialogT">预警内容:</span>
      </el-col>
      <el-col :span="21">
        <span class="dialogT con">{{ detail.warnContent }}</span>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="3">
        <span class="dialogT">发生时间:</span>
      </el-col>
      <el-col :span="21">
        <span class="dialogT con">{{ detail.createTime }}</span>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="3">
        <span class="dialogT">发生网格:</span>
      </el-col>
      <el-col :span="21">
        <span class="dialogT con">{{ detail.area }}</span>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="3">
        <span class="dialogT">发生地点:</span>
      </el-col>
      <el-col :span="21">
        <span class="dialogT con">{{ detail.address }}</span>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="3">
        <span class="dialogT">预警类型:</span>
      </el-col>
      <el-col :span="21">
        <span class="dialogT con">{{ detail.contentType }}</span>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="3">
        <span class="dialogT">状态:</span>
      </el-col>
      <el-col :span="21">
        <span class="dialogT con blue">{{ detail.eventStatus === 0 ? '未处置' : detail.eventStatus === 1 ? '已交办' : detail.eventStatus === 2 ? '已办结' : '已核销'}}</span>
      </el-col>
    </el-row>
    <!-- <div class="u-confirm-dust" v-show="confirmVisible"></div> -->
    <div class="u-confirm" v-show="confirmVisible">
      <p class="isConfirm">是否核销</p>
      <div class="btn-group">
        <div class="item clear  cursor-pointer" @click="handleConfirmClear">取消</div>
        <div class="item sub  cursor-pointer" @click="handleConfirmSubmit">确定</div>
      </div>
    </div>
    <!-- <dd-assign v-if="ddAssignDialog" :eventSource="eventDetailMsg" @close="ddAssignDialog = false" />
    <handle-event-dialog v-if="eventDialogShow" @close="eventDialogShow = false" :eventSource="eventDetailMsg" /> -->
  </div>
  </el-dialog>
  </div>
</template>
<script>
import { qjWarningEdit } from '../../utils/api';
import animate from 'animate.css'
export default {
  name: 'keyDialog',
  // components:{
  //     ddAssign,
  //     handleEventDialog,
  // },
  data() {
    return {
      detail: {},
      dialogVisible:false,
      confirmVisible: false,
      eventDetailMsg:{},
      // eventDialogShow: false,
      // ddAssignDialog: false,
    };
  },
  // props: {
  //   eventDetailMsg: Object,
  // },
  mounted() {
    // this.detail = this.eventDetailMsg;
    window.warningDetailsInit = this.warningDetailsOpen
  },
  methods: {
    warningDetailsOpen(info){
      this.dialogVisible = true;
      this.detail = info;
    },
    handleClose() {
      this.$emit('cancel');
    },
    handleConfirmClear() {
      this.confirmVisible = false;
    },
    handleConfirmSubmit() {
      const { id } = this.eventDetailMsg;
      qjWarningEdit({ id, eventStatus: 3 }).then((res) => {
        console.log(res);
        this.$message.success('核销成功')
        this.confirmVisible = false;
        this.$emit('close');
      });
    },

    handleWriteClick() {
      this.confirmVisible = true;
    },

    handleDdAssignClick() {
      // this.ddAssignDialog = true;
      window.ddAssignInit();
    },

    handlePlatformClick() {
      // this.eventDialogShow = true;
      window.handleEventDialogInit();
    },
  },
};
</script>
<style rel="stylesheet/scss"  scoped>
.dialogT {
  font-size: 18px !important;
  height: 30px;
  line-height: 30px;
  color: #6dfffd;

}
.el-dialog__wrapper {
  width: 3096px;
  overflow: unset !important;
}
.yujinghexiao {
  color: #fff;
  width: 45px;
  height: 45px;
  line-height: 45px;
  font-size: 30px;
  border-radius: 45px;
  background: #ff7a2b;
  text-align: center;
  margin: 0 auto;
}
.u-confirm {
  width: 256px;
  height: 123px;
  background-image: url('../../assets/image/nmodule/imporLayer.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: absolute;
  z-index: 1011;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.btn-group{
    margin: 20px 40px;
}
.btn-group .item{
    color: white;
    width: 85px;
    height: 27px;
    line-height: 27px;
    text-align: center;
}
.btn-group .clear{
    margin-right: 4px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    /* background-image: url('./../../../../assets/image/township-new/event-btn-item-hight-bg.png'); */
}
.btn-group .sub{
    color: #fedc85;
    margin-left: 4px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    /* background-image: url('./../../../../assets/image/township-new/event-btn-item-bg.png'); */
}
.btn-group {
  display: flex;
  height: 27px;
  justify-content: center;
  user-select: none;
}
.isConfirm{
    text-align: center;
    color: #fff;
    font-size: 20px;
    height: 40px;
    line-height: 40px;
    margin: 20px;
}
</style>
<style >
.warnDialogStyle{
    margin: 10px 50px;
}
.el-step__description.is-finish {
  color: #7af3ff;
}
.el-dialog__title {
  color: #7af3ff;
  font-size: 16px;
}
.el-step__title.is-finish {
  color: #7af3ff;
  font-size: 14px;
}

.el-dialog {
  background: rgba(0, 17, 47, 0.8);
}
.el-step__title.is-process {
  color: rgba(255, 255, 255, 0.8);
}
.el-step__description.is-process {
  color: rgba(255, 255, 255, 0.8);
}
.con{
    color: #fff !important;
    font-size: 18px;
}
.fontSize18{
  font-size: 18px;
}
</style>>
